package com.jrx.anytxn.transaction.job.paph.step;

import com.jrx.anytxn.transaction.bean.PaphFileBean;
import com.jrx.anytxn.transaction.entity.TlDisbursementLog;
import com.jrx.anytxn.transaction.entity.TlInterestAccrualLog;
import com.jrx.anytxn.transaction.service.IInterestFileService;
import com.jrx.anytxn.transaction.service.IPaphFileService;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GenerateLoanProcessor implements ItemProcessor<TlDisbursementLog, PaphFileBean> {

    @Autowired
    private IPaphFileService paphFileService;

    @Override
    public PaphFileBean process(TlDisbursementLog item) throws Exception {

        return paphFileService.generateLoanMessage(item);
    }
}
